package com.itheima.controller;

import com.itheima.dto.UserInfoDto;
import com.itheima.dbservice.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserInfoController {
    @Autowired
    private UserInfoService userInfoService;

    @PostMapping("/loginReginfo")
    public ResponseEntity loginReginfo(@RequestBody UserInfoDto userInfoDto, @RequestHeader("Authorization") String token){
        userInfoService.loginReginfo(userInfoDto, token);
        return ResponseEntity.ok(null);
    }
}
